package main.gui;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JComponent;


@SuppressWarnings("serial")
public class NarwhalImage extends JComponent  {
	
	private Image i;
	
	public NarwhalImage(String filename) {
		System.out.println("Loading image: img/"+filename);
		i = new ImageIcon("img/"+filename).getImage();
	}
	
	@Override
	public void paint(Graphics g) {
		g.drawImage(i,0,0,getBounds().width,getBounds().height,null,null);
	}
}
